<template>
  <component :is="type.toLowerCase()" v-bind="$attrs" />
</template>

<script>
import Bar from './Bar.vue'
import Myline from './Line.vue'
export default {
  props: {
    type: {
      type: String,
      required: true,
      validator: value => {
        if (!['bar', 'myline'].includes(value?.toLowerCase())) {
          return false
        }
        return true
      }
    }
  },
  components: {
    bar: Bar,
    myline: Myline
  }
}
</script>

<style lang="scss" scoped></style>
